package com.example.commonmark.slice;

import junit.framework.TestCase;
import org.junit.Assert;
import org.junit.Test;

public class MainAbilitySliceTest extends TestCase {

    @Test
    public void testMarkdownToHtmlExtensions() {
        String html = "<p><a href=\"http://www.lirenmi.cn\" target=\"_blank\">imCoding 爱编程</a></p>\n";
        String markdown = "[imCoding 爱编程](http://www.lirenmi.cn)";
        String resultHtml = MainAbilitySlice.markdownToHtmlExtensions(markdown);
        Assert.assertEquals(html, resultHtml);

        html = "<p>百度(http://www.baidu.com)</p>\n";
        markdown = "百度(http://www.baidu.com)";
        resultHtml = MainAbilitySlice.markdownToHtmlExtensions(markdown);
        Assert.assertEquals(html, resultHtml);
    }
}